package com.example.demo.service.impl;

import com.example.demo.dao.PrizeDao;
import com.example.demo.entity.Prize;
import com.example.demo.service.PrizeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class PrizeServiceImpl implements PrizeService {
    @Resource
    private PrizeDao prizeDao;

    @Override
    public List<Prize> getAllPrize() {
        return prizeDao.getAllPrize();
    }

    @Override
    public Integer updatePrizeCount(Prize prize) {
        return prizeDao.updatePrizeCount(prize);
    }

    @Override
    public Prize getPrizeById(Integer prizeId) {
        return prizeDao.getPrizeById(prizeId);
    }
}
